package lab.anoper.fsm.fsm;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Yan Jiahong
 * @since 2020-09-29
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "UserPayOrder对象", description = "用户微信支付订单表")
public class WxpayOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增ID, 1++")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "支付订单订单ID")
    private String orderId;

    @ApiModelProperty(value = "第三方支付的外部订单号")
    private String outTradeNo;

    @ApiModelProperty(value = "状态, 0-已创建, 1-支付中, 2-支付成功, 3-支付失败")
    private PayOrderState status;

    @ApiModelProperty(value = "状态说明")
    private String statusDesc;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date gmtCreate;

    @ApiModelProperty(value = "更改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date gmtModified;
}